package pro.cherish.knowledgedemoevent;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import pro.cherish.knowledgedemoevent.core.MyApplicationStartingEventListener;

@SpringBootApplication
@Slf4j
public class KnowledgeDemoEventApplication {

    public static void main(String[] args) {
        SpringApplication app =new SpringApplication(KnowledgeDemoEventApplication.class);
        app.addListeners(new MyApplicationStartingEventListener());//加入自定义的监听类
        app.run(args);
        log.info("spring-boot-event-listener-chapter32启动!");

    }

}
